//
//
//
//
//
//
//
//
//
//
//
//
import abstractButton from '../internal/abstractButton'
import icon from '../icon'
import {getColor} from '../utils'
export default {
name: 'mu-float-button',
props: {
icon: {
type: String
},
iconClass: {
type: String,
default: ''
},
href: {
type: String,
default: ''
},
target: {
type: String
},
disabled: {
type: Boolean,
default: false
},
secondary: {
type: Boolean,
default: false
},
mini: {
type: Boolean,
default: false
},
backgroundColor: {
type: String,
default: ''
}
},
computed: {
buttonClass () {
let classNames = []
if (this.secondary) classNames.push('mu-float-button-secondary')
if (this.mini) classNames.push('mu-float-button-mini')
return classNames.join(' ')
},
buttonStyle () {
return {
'background-color': getColor(this.backgroundColor)
}
}
},
methods: {
handleClick (e) {
this.$emit('click', e)
},
handleKeyboardFocus (isFocus) {
this.$emit('keyboardFocus', isFocus)
},
handleHover (event) {
this.$emit('hover', event)
},
handleHoverExit (event) {
this.$emit('hoverExit', event)
}
},
components: {
'abstract-button': abstractButton,
icon
}
}
|